x86: Allow bitop functions to be applied only to fields of at least 4
authorKeir Fraser <keir.fraser@citrix.com>
Sun, 16 Mar 2008 14:11:34 +0000 (14:11 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Sun, 16 Mar 2008 14:11:34 +0000 (14:11 +0000)
commit33c8483360bba3536dc678a94e7f70cb75828066
tree96762b4f3dc117f35580f54b3c7e1d63db0b4f1d
parent266a06100af5272c956bf7dba719b0b823647a5b
x86: Allow bitop functions to be applied only to fields of at least 4
bytes. Otherwise the 'longword' processor instructions used will
overlap with adjacent fields with unpredictable consequences.

This change requires some code fixup and just a few casts (mainly when
operating on guest-shared fields which cannot be changed, and which by
observation are clearly safe).

Based on ideas from Jan Beulich <jbeulich@novell.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
23 files changed:
xen/arch/x86/domain.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/vmcb.c
xen/arch/x86/hvm/vlapic.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/hvm/vmx/vpmu_core2.c
xen/arch/x86/irq.c
xen/arch/x86/mm/paging.c
xen/arch/x86/mm/shadow/private.h
xen/common/domain.c
xen/common/event_channel.c
xen/common/keyhandler.c
xen/common/schedule.c
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/video/vesa.c
xen/include/asm-x86/bitops.h
xen/include/asm-x86/event.h
xen/include/asm-x86/grant_table.h
xen/include/asm-x86/hvm/support.h
xen/include/asm-x86/hvm/svm/vmcb.h
xen/include/asm-x86/hvm/vmx/vmcs.h
xen/include/asm-x86/shared.h
xen/include/xen/shared.h